package com.zhny.aiot.plugin.HeadControlBoxPlugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

/**
 * @author pengshuai
 * @date 2023-03-23 11:30
 */
@Data
public class HeadControlBoxStoreEntity extends StoreEntity {
    @PropertyValue(alias = "水泵",description = "通道1",unit = "",icon= IconConstract.Other,variableType= VariableType.WaterPump,actions={
            @ActionValue(name= Operate.Open,commandCode="open1",eventType= EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="close1",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="check",eventType=EventType.Click)
    })
    private Boolean access1;

    @PropertyValue(alias = "通道2",description = "通道2",unit = "",icon= IconConstract.Other,variableType= VariableType.WaterPump,actions={
            @ActionValue(name= Operate.Open,commandCode="open2",eventType= EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="close2",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="check",eventType=EventType.Click)
    })
    private Boolean access2;

    @PropertyValue(alias = "通道3",description = "通道3",unit = "",icon= IconConstract.Other,variableType= VariableType.WaterPump,actions={
            @ActionValue(name= Operate.Open,commandCode="open3",eventType= EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="close3",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="check",eventType=EventType.Click)
    })
    private Boolean access3;

    @PropertyValue(alias = "通道4",description = "通道4",unit = "",icon= IconConstract.Other,variableType= VariableType.WaterPump,actions={
            @ActionValue(name= Operate.Open,commandCode="open4",eventType= EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="close4",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="check",eventType=EventType.Click)
    })
    private Boolean access4;

    @PropertyValue(alias = "通道5",description = "通道5",unit = "",icon= IconConstract.Other,variableType= VariableType.WaterPump,actions={
            @ActionValue(name= Operate.Open,commandCode="open5",eventType= EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="close5",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="check",eventType=EventType.Click)
    })
    private Boolean access5;


    @Override
    public String toString(){
        StringBuffer sb = new StringBuffer();
        sb.append("access1=").append(this.access1);
        sb.append(", access2=").append(this.access1);
        sb.append(", access3=").append(this.access1);
        sb.append(", access4=").append(this.access1);
        sb.append(", access5=").append(this.access1);
        return sb.toString();
    }
}
